﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace MT.Models.Migrations
{
    public partial class db12 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<long>(
                name: "OriginalPrice",
                table: "StoreOrderDetail",
                nullable: false,
                defaultValue: 0L);
            migrationBuilder.Sql("update [StoreOrderDetail] set [OriginalPrice]=[Price]-[DiscountPrice]");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "OriginalPrice",
                table: "StoreOrderDetail");
        }
    }
}
